/**
 * 
 */
package com.easidea.tim.entity.temp;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springside.core.dao.extend.Undeletable;

import com.easidea.tim.entity.BaseEntity;

/**
 * @author Harrison
 *
 */
@Entity(name="tim_temp_inventory")
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Cache(region="tim_temp_inventory",usage=CacheConcurrencyStrategy.READ_WRITE)
@Undeletable(status="deleted")
public class TempInventory extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1458213884414895933L;

	
	private String productName; // 品名
	private String colorCode; //色号
	private Double totalMeterNum; // 总米数
	private Double totalPiNum; //总匹数
	private Boolean sampleFlag; // 是否剪样
	private Date inventoryDate; // 盘点日期
	private List<TempInventoryDetail> inventoryDetailList; // 明细数据
	
	/**
	 * @return the productName
	 */
	@Column(name="product_name")
	public String getProductName() {
		return productName;
	}
	/**
	 * @param productName the productName to set
	 */
	public void setProductName(String productName) {
		this.productName = productName;
	}
	/**
	 * @return the totalMeterNum
	 */
	@Column(name="total_meter_num")
	public Double getTotalMeterNum() {
		return totalMeterNum;
	}
	/**
	 * @param totalMeterNum the totalMeterNum to set
	 */
	public void setTotalMeterNum(Double totalMeterNum) {
		this.totalMeterNum = totalMeterNum;
	}
	/**
	 * @return the totalPiNum
	 */
	@Column(name="total_pi_num")
	public Double getTotalPiNum() {
		return totalPiNum;
	}
	/**
	 * @param totalPiNum the totalPiNum to set
	 */
	public void setTotalPiNum(Double totalPiNum) {
		this.totalPiNum = totalPiNum;
	}
	/**
	 * @return the sampleFlag
	 */
	@Column(name="is_sample")
	public Boolean getSampleFlag() {
		return sampleFlag;
	}
	/**
	 * @param sampleFlag the sampleFlag to set
	 */
	public void setSampleFlag(Boolean sampleFlag) {
		this.sampleFlag = sampleFlag;
	}
	/**
	 * @return the inventoryDetailList
	 */
	@OneToMany(mappedBy="tempInventory",cascade=CascadeType.REMOVE,fetch=FetchType.LAZY)
	public List<TempInventoryDetail> getInventoryDetailList() {
		return inventoryDetailList;
	}
	/**
	 * @param inventoryDetailList the inventoryDetailList to set
	 */
	public void setInventoryDetailList(List<TempInventoryDetail> inventoryDetailList) {
		this.inventoryDetailList = inventoryDetailList;
	}
	/**
	 * @return the colorCode
	 */
	@Column(name="color_code")
	public String getColorCode() {
		return colorCode;
	}
	/**
	 * @param colorCode the colorCode to set
	 */
	public void setColorCode(String colorCode) {
		this.colorCode = colorCode;
	}
	/**
	 * @return the inventoryDate
	 */
	@Column(name="inventory_date")
	@Temporal(TemporalType.DATE)
	public Date getInventoryDate() {
		return inventoryDate;
	}
	/**
	 * @param inventoryDate the inventoryDate to set
	 */
	public void setInventoryDate(Date inventoryDate) {
		this.inventoryDate = inventoryDate;
	}
	
}
